{% extends 'marks/teacher/page.html' %}

{% block content %}
	<a href="/marks/lesson/add/">Добавить урок</a><br />
	{% include 'helpers/search_form.html' %}
	{% if not objects.object_list and not search_str %}
	<br />
	Уроков нет.
	{% endif %}
	{% if objects.object_list %}
		<table class="list">
		    <thead>
		        <td>Тема урока</td>
		        <td>Класс</td>
		        <td>Действия</td>
		    </thead>
		{% for object in objects.object_list %}
		    <tr>
		        <td>{{ object.topic|default:"Тема не указана" }}</td>
		        <td>{{ object.grade.all|join:", " }}</td>
		        <td><a href="/marks/lesson/edit/{{ object.id }}/">Редактировать</a>, <a href="/marks/lesson/delete/{{ object.id }}/" class="delete">удалить</a>.</td>
		    </tr>
		{% endfor %}
		</table>
	{% include "helpers/paginator.html" %}
	{% endif %}
{% endblock %}